package com.topisv.tms.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.topisv.tms.entity.StoragePartition;
import com.topisv.tms.entity.StoragePipe;

public interface StoragePipeDao extends PagingAndSortingRepository<StoragePipe, Long>, JpaSpecificationExecutor<StoragePipe>{
	/*@Modifying
	@Query("select st from Storage st where st.areaGroup.id = ?1")
	List<Storage> getByAreaGroupId(Long id);
	
	@Query("select st from Storage st where st.areaGroup.id = ?1 and st.type=?2")
	List<Storage> findByAreaGroup(Long areaGroupId,String type);*/
	@Modifying
	@Query("select st from StoragePipe st where st.partitionCode = ?1")
	List<StoragePipe> findBySPCode(String sp_code);
}
